import collections

def init():
    # 任务调度管理
    global taskAdmin
    # 模拟实盘任务Map
    global simulaterTaskMap

    taskAdmin = None
    simulaterTaskMap = collections.defaultdict(list)

def getTaskAdmin():
    return taskAdmin

def setTaskAdmin(arg):
    global taskAdmin
    taskAdmin = arg

def getTaskCenter(taskid):
    if taskid in simulaterTaskMap:
        return simulaterTaskMap[taskid]
    return None

def addTaskCenter(taskid, taskCenter):
    simulaterTaskMap[taskid] = taskCenter

